<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script>
  $(function(){
    $('#btn').click(function(){
      $.ajax({
        type: "post",
        url: "/h",
        data: JSON.stringify({
          id:$("#id").val(),
        }),
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        success: function(data){
          console.log(data);
          var html="<>";
            html += "<tr>"+
                    "<td>"+data.id+"</td>"+
                    "<td>"+data.name+"</td>"+
                    "<td>"+data.department_type+"</td>"+
                    "<td>"+data.register_type+"</td>"+
                    "<td>"+data.doctor_id+"</td>"+
                    "<td>"+data.time+"</td>"+
                    "<td>"+data.price_r+"</td>"
            "</tr>"
          $("#content").html(html);
        }
      });
    });
  });
</script>
<p>
  请输入id号：<input type="text" name="id" id="id">
  <input type="button" value="查询" id="btn">
</p>
<table>
  <tr>
    <td>id号</td>
    <td>病人姓名</td>
    <td>科室类型</td>
    <td>门诊类型</td>
    <td>医生类型</td>
    <td>时间</td>
    <td>价钱</td>
  </tr>
  <tbody id="content">

  </tbody>
</table>
</body>
</html>